package com.xtwy.entity;

import com.xtwy.common.core.entity.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.apache.ibatis.type.Alias;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.List;

/**
 * @作 者: 侯建军
 * @日 期: 2018/7/28 10:05
 * @描 述: @Id 标注用于声明一个实体类的属性映射为数据库的主键列。
 * @公 司：山西迅腾伟业
 */
@Data
@Table(name="t_user_role")
@Alias(value="roleUser")
public class RoleUser extends BaseEntity{
    @Id
    @Column(name = "user_id")
    private Integer userId;
    @Id
    @Column(name = "role_id")
    private Integer roleId;
    @Getter
    @Setter
    private List<Role> listRole;
    @Getter
    @Setter
    private List<User> listUser;
}
